﻿<%@ Page Title="" Language="C#" MasterPageFile="~/NonLogged.Master" AutoEventWireup="true" CodeBehind="ViewFleet.aspx.cs" Inherits="PL___Web_Application.ViewFleet" %>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
  
        .TableRow
        {
            background-color: #DCDCDC;
            color: #000000;
            height:16px;
        }
        .TableRow:hover
        {
            background-color: #0099CC;
            cursor: pointer;
        }
        .ColumnTitle
        {
            height: 35px;
            font-size: 14px;
            font-weight: bold;
            text-transform: uppercase;
            text-align: center;
              background-color: #bbbbbb;
            color: #ffffff;
        }
      
.ListTable
        {
            margin-left: auto;
            margin-right: auto;            
            width:510px;
            border:5 solid #aaaaaa; 
            border-collapse:collapse;
            
        }
         </style>
         <title>List of Vehicles in our fleet</title>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="contentplaceholder" runat="server">
    <br />
<div>
  <h2>List of Cars in our Fleet</h2>
       
                    <asp:ListView ID="ListView1" runat="server" DataSourceID="CarListSource">
                        <ItemTemplate>
                            <tr class="TableRow" onclick="alert('Please Register to see more details')">
                                <td>
                                    <asp:Label ID="TypeCar" runat="server" Text="" typecarid='<%# Eval("type_car") %>'
                                        OnPreRender="GetTypeCar" ClientIDMode="Static" />
                                </td>
                                <td>
                                    <asp:Label ID="Fuel" runat="server" Text="" fuelid='<%# Eval("Vehicle.fuel") %>'
                                        OnPreRender="GetFuel" ClientIDMode="Static" />
                                </td>
                                <td>
                                    <%# Eval("Vehicle.colour") %>
                                </td>
                                <td>
                                    <%# Eval("doors_number") %>
                                </td>
                                <td>
                                    <%# Eval("Vehicle.price") %>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <LayoutTemplate>
                           <table id="itemPlaceholderContainer" runat="server" class="ListTable" border="1">
                                <tr id="Tr1" runat="server" style="background-color: #DCDCDC; color: #000000;">
                                    <th id="Th1" runat="server">
                                        <div class='ColumnTitle'>
                                            Type
                                        </div>
                                    </th>
                                    <th id="Th2" runat="server">
                                        <div class='ColumnTitle'>
                                            Fuel
                                        </div>
                                    </th>
                                    <th id="Th3" runat="server">
                                        <div class='ColumnTitle'>
                                            Colour
                                        </div>
                                    </th>
                                    <th id="Th4" runat="server">
                                        <div class='ColumnTitle'>
                                            Num. Doors
                                        </div>
                                    </th>
                                    <th id="Th5" runat="server">
                                        <div class='ColumnTitle'>
                                            Price
                                        </div>
                                    </th>
                                </tr>
                                <tr id="itemPlaceholder" runat="server">
                                </tr>
                            </table>
                        </LayoutTemplate>
                    </asp:ListView>
                    <asp:ObjectDataSource ID="CarListSource" runat="server" SelectMethod="getCarList"
                        TypeName="BusinessLayer.BL"></asp:ObjectDataSource>
  <h2>List of Trucks in our Fleet</h2>
   <asp:ListView ID="TrucksListView" runat="server" DataSourceID="TrucksDataSource">
                        <ItemTemplate>
                            <tr class="TableRow" onclick="alert('Please Register to see more details')">
                                <td>
                                     <%# Eval("tonnage") %>
                                </td>
                                <td>
                                    <asp:Label ID="Fuel" runat="server" Text="" fuelid='<%# Eval("Vehicle.fuel") %>'
                                        OnPreRender="GetFuel" ClientIDMode="Static" />
                                </td>
                                <td>
                                    <%# Eval("Vehicle.colour") %>
                                </td>
                                <td>
                                    <%# Eval("num_wheels") %>
                                </td>
                                <td>
                                    <%# Eval("high") %>
                                </td>
                                <td>
                                    <%# Eval("width") %>
                                </td>
                                <td>
                                    <%# Eval("large") %>
                                </td>
                                <td>
                                    <%# Eval("Vehicle.price") %>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <LayoutTemplate>
                            <table id="itemPlaceholderContainer" runat="server" class="ListTable" border="1">
                                <tr id="Tr1" runat="server" style="background-color: #DCDCDC; color: #000000;">
                                    <th id="Th1" runat="server">
                                        <div class='ColumnTitle'>
                                            Tonnage
                                        </div>
                                    </th>
                                    <th id="Th2" runat="server">
                                        <div class='ColumnTitle'>
                                            Fuel
                                        </div>
                                    </th>
                                    <th id="Th3" runat="server">
                                        <div class='ColumnTitle'>
                                            Colour
                                        </div>
                                    </th>
                                    <th id="Th4" runat="server">
                                        <div class='ColumnTitle'>
                                            Num. Wheels
                                        </div>
                                    </th>
                                    <th id="Th5" runat="server">
                                        <div class='ColumnTitle'>
                                            Trunk Hight
                                        </div>
                                    </th>
                                    <th id="Th6" runat="server">
                                        <div class='ColumnTitle'>
                                            Trunk Width
                                        </div>
                                    </th>
                                    <th id="Th7" runat="server">
                                        <div class='ColumnTitle'>
                                            Trunk Large
                                        </div>
                                    </th>
                                    <th id="Th8" runat="server">
                                        <div class='ColumnTitle'>
                                            Price
                                        </div>
                                    </th>
                                </tr>
                                <tr id="itemPlaceholder" runat="server">
                                </tr>
                            </table>
                        </LayoutTemplate>
                    </asp:ListView>
                    <asp:ObjectDataSource ID="TrucksDataSource" runat="server" SelectMethod="getTruckList"
                        TypeName="BusinessLayer.BL"></asp:ObjectDataSource>
</div>
</asp:Content>
